using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

public class DomainModel
{
    private static DomainModel _instance;
    private Object currentObject = null;
         
    public static DomainModel getInstance()
    {
        if (_instance == null)
        {
            _instance = new DomainModel();
        }

        return _instance;
    }

    public Object getDomainModelObject(String className)
    {
        
        if (this.currentObject == null)
        {
            Assembly requestedClass = Assembly.LoadFrom("D:/frk/Projetos Software/UsiXML360/rsc/CsharpCalculator.dll");
            this.currentObject = requestedClass.CreateInstance(className);
        }

        return this.currentObject;
    }

}
